﻿-- =============================================
-- Author:		GMH
-- Create date: 24/10/2012
-- Description:	
-- =============================================
CREATE PROCEDURE spObtenComboEstudiosPaq
	@pnIdPaquete INT,
	@pnIdLaboratorio INT
AS
BEGIN
	SET NOCOUNT ON;

    SELECT	pe.IdEstudio, e.NombreEstudio
    FROM	dbo.PaqueteEstudioDet	pe
    INNER JOIN dbo.CatEstudio		e
    ON		pe.IdLaboratorio	= e.IdLaboratorio
    AND		pe.IdEstudio		= e.IdEstudio
    AND		ISNULL(e.BajaLogica,0)		= 0
    WHERE	pe.IdPaquete		= @pnIdPaquete
    AND		pe.IdLaboratorio	= @pnIdLaboratorio
	
	SET NOCOUNT OFF;
END